package com.zhijiaoyun.service;

import java.util.List;

import com.zhijiaoyun.model.Collection;
import com.zhijiaoyun.model.dto.CollectionDto;
import com.zhijiaoyun.model.dto.PageList;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface ICollectionService {

	/**
	 * get bu ids
	 * @param relationId
	 * @param userId
	 * @param collectionType
	 * @return
	 */
	Collection getByIds(Long relationId, Long userId, int collectionType);

	/**
	 * add
	 * @param collection
	 */
	void addCollection(Collection collection);

	/**
	 * get by collectionId userId
	 * @param collectionId
	 * @param userId
	 * @return
	 */
	Collection getByCollectionIdUserId(Long collectionId, Long userId);

	/**
	 * delete
	 * @param collection
	 */
	void deleteCollection(Collection collection);

	/**
	 * list by userId
	 * @param pageIndex
	 * @param userId
	 * @param type
	 * @return
	 */
	List<Collection> getByUserId(Integer pageIndex, Long userId, int type);

	/**
	 * list dto by userId
	 * @param pageIndex
	 * @param userId
	 * @param type
	 * @return
	 */
	List<CollectionDto> getDtoByUserId(Integer pageIndex, Long userId, int type);

	/**
	 * page
	 * @param pageIndex
	 * @param pageSize
	 * @param userId
	 * @param type
	 * @return
	 */
	PageList<CollectionDto> pageDtoByUserId(Integer pageIndex, int pageSize, long userId, int type);

}
